package org.example.picocli;

import picocli.CommandLine;

import java.security.MessageDigest;
import java.util.Arrays;
import java.util.concurrent.Callable;

class Login implements Callable<Integer> {
    @CommandLine.Option(names = {"-u", "--user"}, description = "User name",interactive = true)
    String user;

    @CommandLine.Option(names = {"-p", "--password"}, description = "Passphrase", interactive = true)
    String password;

    public Integer call() throws Exception {
        System.out.println("user="+user+",password="+password);

        return 0;
    }

    public static void main(String[] args) {
        int exitCode = new CommandLine(new Login()).execute("-u", "-p");
        System.exit(exitCode);
    }
}